package com.company.thread;

/**
 * @description: some desc
 * @author: ruoan
 * @date: 2020/10/23 14:17
 */
public class MyThread7 {


    //Thread.interrupted()方法r

    public static void main(String[] args) {
        System.out.println("Point X: Thread.interrupted()="+Thread.interrupted());
        //设置线程中断标记
        Thread.currentThread().interrupt();
        //isInterrupted()返回true,但是Thread.interrupted()不仅return true而且会隐式修改中断标记为 false
        System.out.println("Point X2: Thread.interrupted()="+Thread.interrupted());
        System.out.println("Point X3: Thread.interrupted()="+Thread.interrupted());
        System.out.println("Point X4: Thread.interrupted()="+Thread.interrupted());
        System.out.println("Point X5: Thread.interrupted()="+Thread.interrupted());





    }
}
